package com.example.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author 紫煦桉
 */
public class UserMessage extends AbstractToString {
    private Integer userNo;
    private String name;
    private String userSex;
    private String password;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date userHireTime;
    private Double salary;
    private String userPhone;
    private String userEmail;
    private Dept dept;

    public UserMessage() {
    }

    public UserMessage(Integer userNo) {
        this.userNo = userNo;
    }

    public UserMessage(Integer userNo, String name, String userSex, String password, Date userHireTime, Double salary, String userPhone, String userEmail) {
        this.userNo = userNo;
        this.name = name;
        this.userSex = userSex;
        this.password = password;
        this.userHireTime = userHireTime;
        this.salary = salary;
        this.userPhone = userPhone;
        this.userEmail = userEmail;
    }

    public UserMessage(Integer userNo, String name, String userSex, String password, Date userHireTime, Double salary, String userPhone, String userEmail, Dept dept) {
        this.userNo = userNo;
        this.name = name;
        this.userSex = userSex;
        this.password = password;
        this.userHireTime = userHireTime;
        this.salary = salary;
        this.userPhone = userPhone;
        this.userEmail = userEmail;
        this.dept = dept;
    }

    public Integer getUserNo() {
        return userNo;
    }

    public void setUserNo(Integer userNo) {
        this.userNo = userNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUserSex() {
        return userSex;
    }

    public void setUserSex(String userSex) {
        this.userSex = userSex;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Date getUserHireTime() {
        return userHireTime;
    }

    public void setUserHireTime(Date userHireTime) {
        this.userHireTime = userHireTime;
    }

    public Double getSalary() {
        return salary;
    }

    public void setSalary(Double salary) {
        this.salary = salary;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }
}